import request from '@/utils/request'

export function list(query) {
  return request({
    url: '/store/getList',
    method: 'post',
    params: query
  })
}

export function getMyList(query) { // 获取登陆人的店铺信息
  return request({
    url: '/roleStore/getList',
    method: 'post',
    params: query
  })
}

export function getRoleList(query) { // 获取角色的店铺信息
  return request({
    url: '/roleStore/getStoreByRole',
    method: 'post',
    params: query
  })
}

export function roleStoreCreate(query) { // 提交店铺分配信息
  return request({
    url: '/roleStore/create',
    method: 'post',
    params: query
  })
}

export function getUnallocatedStoreList(query) { // 提交未分配的店铺列表
  return request({
    url: '/store/getStoreList',
    method: 'post',
    params: query
  })
}



export function create(data) {
  return request({
    url: '/store/create',
    method: 'post',
    data
  })
}

export function isStatus(data) {
  return request({
    url: '/store/update',
    method: 'post',
    params: data
  })
}

export function update(data) {
  return request({
    url: '/store/editStore',
    method: 'post',
    data
  })
}

export function remove(data) {
  return request({
    url: '/store/deleted',
    method: 'post',
    params: data
  })
}
